{% extends 'base/edit.html' %}
{% load i18n static app_extras%}
{% block title %}修改密码 数据中心运维平台 - IDCOPS{% endblock %}
{% block content-header %}<h1>修改密码 <small> {{request.user}}</small></h1>{% endblock %}

{% block form %}
<form method="post" class="form-horizontal">{% csrf_token %}
<div class="box-body">
{% if form.errors %}
    <p class="errornote">
    {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
    </p>
{% endif %}


<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>

<fieldset class="module aligned wide margin-bottom">

<div class="form-row">
    {{ form.old_password.errors }}
    {{ form.old_password.label_tag }} {{ form.old_password|addcss:"form-control" }}
</div>

<div class="form-row">
    {{ form.new_password1.errors }}
    {{ form.new_password1.label_tag }} {{ form.new_password1|addcss:"form-control" }}
    {% if form.new_password1.help_text %}
    <div class="help">{{ form.new_password1.help_text|safe }}</div>
    {% endif %}
</div>

<div class="form-row">
{{ form.new_password2.errors }}
    {{ form.new_password2.label_tag }} {{ form.new_password2|addcss:"form-control" }}
    {% if form.new_password2.help_text %}
    <div class="help">{{ form.new_password2.help_text|safe }}</div>
    {% endif %}
</div>

</fieldset>

<div class="submit-row">
    <input type="submit" value="{% trans 'Change my password' %}" class="btn btn-primary btn-sm" />
</div>

</div>
</form>
{%endblock form%}
